<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,target-densitydpi=device-dpi, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>手机APP下载</title>
    <script src="./js/jquery-1.7.2.min.js"></script>
    <style>
        *{margin:0;padding:0;}
        /*遮罩层样式*/
        .loading-indicator{ position: absolute; top:0rem;width: 100%; height: 100%; z-index: 1000; background:black; opacity: 0.7; display:none; }
        .indicator{ position:absolute; width:100%; top:0px;z-index: 1222; }
        .indicator .img1{ width:100%; display:none; }
        .indicator .img2{ width:100%; display:none; }
        .ovfHiden{overflow: hidden;height: 100%;}
    </style>
    
</head>
<body>
     <!--遮罩层-->
    
    <div  class="loading-indicator"></div>
    <div class="indicator">
        <img class="img1" src="./images/live_weixin_android.png" alt="">
        <img class="img2" src="./images/live_weixin_ios.png" alt="">
    </div>
</body>
    <script type="text/javascript">
        var hostname="http://www.shidiquan.cn/sdq/";
        // 获取终端的相关信息
        var Terminal = {
            // 辨别移动终端类型
            platform : function(){
                var u = navigator.userAgent, app = navigator.appVersion;
                return {
                    // android终端或者uc浏览器
                    android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
                    // 是否为iPhone或者QQHD浏览器
                    iPhone: u.indexOf('iPhone') > -1 ,
                    // 是否iPad
                    iPad: u.indexOf('iPad') > -1
                };
            }(),
            isWeixin:function(){
                //判断是否为微信
                var ismicr;
                if(Terminal.platform.android){
                    ismicr = (navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger");
                }else if(Terminal.platform.iPhone){
                    ismicr=(navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger")|| navigator.userAgent.toLowerCase().match(/qq/i) == "qq";
                }
                return ismicr;
            },
            // 辨别移动终端的语言：zh-cn、en-us、ko-kr、ja-jp...
            language : (navigator.browserLanguage || navigator.language).toLowerCase()
        };
            // 还可以通过language，区分开多国语言版
            /*switch(Terminal.language){
                case 'en-us':
                    theUrl = '你的iPad APP（英文版）对应下载地址：APP Store地址';
                    break;
                case 'ko-kr':
                    theUrl = '你的iPad APP（韩语版）对应下载地址：APP Store地址';
                    break;
                case 'ja-jp':
                    theUrl = '你的iPad APP（日文版）对应下载地址：APP Store地址';
                    break;
                default:
                    theUrl = '你的iPad APP（中文版-默认）对应下载地址：APP Store地址';
            }*/
//        }
//        location = theUrl;
        
        function showOrhide(){
            if(Terminal.platform.android){
//              promptInfo("1","img1");
 location.href="http://www.shidiquan.cn/sdq/h5/webService/appDownload/1";
            }else if(Terminal.platform.iPhone){
                promptInfo();
            }else if(Terminal.platform.iPad){
                promptInfo();
            }else{
 location.href="http://www.shidiquan.cn/sdq/h5/webService/appDownload/1";
            }
        }      
        function promptInfo(img){
            if (Terminal.isWeixin()){ //下如果是微信浏览器,提示在浏览器中打开 
               $(".indicator").find(".img2").css("display","block")
                              .siblings().css("display","none");
               $(".loading-indicator").css("display","block");
               location.href="https://itunes.apple.com/cn/app/shi-de-quan/id1072042467?mt=8";
            } else { //不是微信浏览器的时候所做的判断
               $(".indicator").find(".img2").css("display","none")
                              .siblings().css("display","none");
               $(".loading-indicator").css("display","none");
                location.href="https://itunes.apple.com/cn/app/shi-de-quan/id1072042467?mt=8";
            }
        }
        showOrhide();
    </script>
</html>